negotiator.boaframework
Class BOAcomponent

java.lang.Object
  extended by negotiator.boaframework.BOAcomponent
All Implemented Interfaces:
java.io.Serializable

public class BOAcomponent
extends java.lang.Object
implements java.io.Serializable

Creates a BOA component consisting of the classname of the component, the type of the component, and all parameters. Please report bugs to author.

Version:
16-01-12
Author:
Mark Hendrikx (m.j.c.hendrikx@student.tudelft.nl)
See Also:
Serialized Form

Constructor Summary
BOAcomponent(java.lang.String classname, java.lang.String type)
          Variant of the main constructor in which it is assumed that the component has no parameters.
BOAcomponent(java.lang.String classname, java.lang.String type, java.util.ArrayList<BOAparameter> orgParam)
          Variant of the main constructor in which it is assumed that the component has no parameters.
BOAcomponent(java.lang.String classname, java.lang.String type, java.util.HashMap<java.lang.String,java.math.BigDecimal> strategyParam)
          Creates a BOA component consisting of the classname of the components, the type, and the parameters with which the component should be loaded.
 
Method Summary
 void addParameter(java.lang.String name, java.math.BigDecimal value)
          Add a parameter to the set of parameters of this component.
 java.lang.String getClassname()
           
 java.util.HashMap<java.lang.String,java.math.BigDecimal> getFullParameters()
           
 java.util.ArrayList<BOAparameter> getOriginalParameters()
           
 java.util.HashMap<java.lang.String,java.lang.Double> getParameters()
           
 java.lang.String getType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BOAcomponent

public BOAcomponent(java.lang.String classname,
                    java.lang.String type,
                    java.util.HashMap<java.lang.String,java.math.BigDecimal> strategyParam)
Creates a BOA component consisting of the classname of the components, the type, and the parameters with which the component should be loaded.

Parameters:
classname - of the component.
type - of the component (for example bidding strategy).
strategyParam - parameters of the component.

BOAcomponent

public BOAcomponent(java.lang.String classname,
                    java.lang.String type)
Variant of the main constructor in which it is assumed that the component has no parameters.

Parameters:
classname - of the component.
type - of the component (for example bidding strategy).

BOAcomponent

public BOAcomponent(java.lang.String classname,
                    java.lang.String type,
                    java.util.ArrayList<BOAparameter> orgParam)
Variant of the main constructor in which it is assumed that the component has no parameters. In addition a backup is made of the original BigDecimal specification of the parameters. This is used to avoid rounding errors in the GUI.

Parameters:
classname - of the component.
type - of the component (for example bidding strategy).
orgParam - backup of original parameters
Method Detail

addParameter

public void addParameter(java.lang.String name,
                         java.math.BigDecimal value)
Add a parameter to the set of parameters of this component.

Parameters:
name - of the parameter.
value - of the parameter.

getClassname

public java.lang.String getClassname()
Returns:
name of the class of the component.

getType

public java.lang.String getType()
Returns:
type of the component.

getParameters

public java.util.HashMap<java.lang.String,java.lang.Double> getParameters()
Returns:
parameters of the component.

getFullParameters

public java.util.HashMap<java.lang.String,java.math.BigDecimal> getFullParameters()
Returns:
original parameters as specified in the GUI.

getOriginalParameters

public java.util.ArrayList<BOAparameter> getOriginalParameters()
Returns:
the full parameters objects used to specify each parameter.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object